import Vue from 'vue'
import App from './App.vue'
import { initRouter } from './router'
import './theme/index.less'
import Antd from 'ant-design-vue'
import Viser from 'viser-vue'
import store from './store'
import 'animate.css/source/animate.css'
import Plugins from '@/plugins'
import { initI18n } from '@/utils/i18n'
import bootstrap from '@/bootstrap'
import VueStorage from 'vue-ls'

/** 引入通用的样式文件 */
import '@/assets/less/common.less'

// import VideoPlayer from 'vue-video-player'
// Vue.use(VideoPlayer)
// require('vue-video-player/src/custom-theme.css')

const router = initRouter(store.state.setting.asyncRoutes)

const i18n = initI18n('CN', 'US')
const storageOptions = {
  namespace: 'sai__', // key prefix
  name: 'ls', // name variable Vue.[ls] or this.[$ls],
  storage: 'local' // storage name session, local, memory
}

Vue.use(Antd)
Vue.config.productionTip = false
Vue.use(Viser)
Vue.use(Plugins)
Vue.use(VueStorage, storageOptions)

bootstrap({ router, store, i18n, message: Vue.prototype.$message })

new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')
